import { PureComponent } from 'react'
import styles from './supplierModal.less'
import { Modal, Form, Input } from 'antd';
const FormItem = Form.Item
@Form.create()
class SupplierModal extends PureComponent {
    handleCancel = () => {
        const { onCancel } = this.props
        onCancel()
    }
    handleOk = () => {
        const { onOk } = this.props
        onOk()
    }
    render(){
        const { visible, form } = this.props
        const { getFieldDecorator } = form
        return(
            <Modal
                title="供应商信息"
                visible={visible}
                onOk={this.handleOk}
                onCancel={this.handleCancel}
            >
                <Form layout="inline">
                    <FormItem label="供应商名字：">
                        {getFieldDecorator('labelCode', {
                        rules: [{ required: true, message: '请输入会员号!' }],
                        })(
                        <Input className={styles.customerModalInput}
                            // ref={n => { this.labelNum = n}}
                        />
                        )}
                    </FormItem>
                    <FormItem label="银行账户：">
                        {getFieldDecorator('superCode', {
                        rules: [{ required: false, message: '请选择优惠类型!' }],
                        })(
                            <Input className={styles.customerModalInput} />

                        )}
                    </FormItem>
                    <FormItem label="电话：">
                        {getFieldDecorator('superCode', {
                        rules: [{ required: false, message: '请选择优惠类型!' }],
                        })(
                            <Input className={styles.customerModalInput} />

                        )}
                    </FormItem>
                </Form>
            </Modal>
        )
    }
}
export default SupplierModal